﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using COP;
using COP.Objects.Config;
using COP.Readers;
using System.Configuration;
using COP.Objects.Maps;
using System.Collections;


namespace ClientApp
{
  




    class Test
    {
                string name = "ffff";


                public event TestEvent tt;
                public delegate void TestEvent(string name);


                public void b(MAPBase p)
                {

                    p.Value = "Asfsdfnsdfjsdkgjbfkdjbghbfvkjbdfhgbfdjkg";
                
                }

                public void a(MAPBase p)
                {
                    if (tt != null)
                        tt("Dfsdfd");

                }


                public void COPCall()
                {
                    //bool test =COPProvider.GetBoolean("Test");
                    //string str = COPProvider.GetValue("Check").ToString();
                   
                    //List<MAPBase> coll= COPProvider.GetValueList("MultiList", this);
                    //foreach (MAPBase map in coll)
                    //{
                    //    Console.WriteLine(map.Process().ToString());
                    //}

                    COPProvider p = new COPProvider(new CustomReader());
                    //COPProvider p = new COPProvider(ConfigurationManager.AppSettings["SRC"].ToString());
                    List<MAPBase> coll1 = p.ExtractValueList("MultiList", this);
                    foreach (MAPBase map in coll1)
                    {
                        Console.WriteLine(map.Process().ToString());
                    }
                }


               
    
    
    }

    class Program
    {
        static void Main(string[] args)
        {
            //bool test = (bool)COPProvider.GetValue("Test");
            //MAP keyVal = (MAP)COPProvider.GetValue("Check");
            //List<MAP> val = COPProvider.GetValueList("List");
            
            //List<MAP> val1 = COPProvider.GetValueList("MultiList");

         

            //COPProvider p = new COPProvider();
            //p.MapCreating += new MapEventHandler(p_MapCreating);
            //Test t = new Test();
            //t.tt += new Test.TestEvent(t_tt);




            Test t = new Test();
            t.COPCall();
            Console.ReadLine();
        }

       
    }
}
